# Configuration and Management Commands

Snow CLI configuration, connection, permission management, and runtime status commands.

Back to: [Command Panel Guide](./09.0.Command%20Panel%20Guide.md)

---

## `/home`

Return to welcome page.

- **Function**: Return to Snow CLI main menu/welcome interface
- **Features**:
  - Pause codebase indexing
  - Clear API configuration cache
  - Reset client connection
- **Example**: Type `/home` to return to homepage

## `/ide`

Connect IDE plugin.

- **Function**: Connect to VSCode or JetBrains IDE plugin
- **Features**:
  - Automatically detect and connect IDE
  - Display connection port
  - Force reconnect (if already connected)
- **Prerequisite**: Need to install corresponding IDE plugin first
- **Example**: Type `/ide` to establish connection

## `/connect`

Connect to a Snow Instance.

- **Function**: Open the instance connection panel, log in, and connect to a remote Snow Instance for AI processing
- **Usage**:
  - No parameters: `/connect` - Open the connection wizard
  - With API URL: `/connect http://localhost:5136/api` - Open the panel with the API URL prefilled
- **Features**:
  - Reuse saved connection settings when available
  - Step through API URL, username/password, instance ID, and display name entry
  - On the saved-config screen, press `D` to delete the saved connection configuration
- **Panel Operations**:
  - `Enter` - Continue to the next step or submit the current form
  - `↑/↓` - Switch focus between fields on multi-field steps
  - `ESC` - Go back or close the panel
- **Examples**:
  - `/connect` - Open the connection panel
  - `/connect http://localhost:5136/api` - Prefill the URL and connect

## `/disconnect`

Disconnect from the current Snow Instance.

- **Function**: Disconnect the currently active instance connection
- **Use Cases**: Switch instances, clear remote connection state, or stop routing requests through an instance
- **Example**: Type `/disconnect` to disconnect

## `/connection-status`

Show instance connection status.

- **Function**: Print the current Snow Instance status, instance information, and any error details when available
- **Use Cases**: Troubleshoot connection failures or confirm whether you are connected to the intended instance
- **Example**: Type `/connection-status` to inspect the connection status

## `/mcp`

View MCP services.

- **Function**: Open MCP (Model Context Protocol) service panel
- **Features**: Display list and status of configured MCP services
- **Example**: Type `/mcp` to view services

## `/usage`

View usage statistics (TUI panel).

- **Function**: Open the usage statistics panel and aggregate token usage by model
- **Time windows** (`Tab` to cycle; rolling windows, not calendar buckets):
  - Last 24 hours
  - Last 7 days
  - Last 30 days (default)
  - Last 12 months
- **Data directory**: `~/.snow/usage/YYYY-MM-DD/*.jsonl` (one append-only JSONL line per API call; compatible across versions)
- **Example**: Type `/usage` to open the panel, then press `Tab` to switch windows
- **Headless entry**: see session-command `usage` / `snow cmd usage [--period=...]`

## `/telemetry`

Open the OpenTelemetry telemetry configuration panel.

- **Function**: Configure Snow CLI OpenTelemetry export settings
- **Features**:
  - Enable or disable telemetry
  - Configure exporters for traces, metrics, and logs
  - Support OTLP, console, and none; metrics additionally support Prometheus
  - Configure OTLP protocol (`grpc`, `http/protobuf`, `http/json`), endpoint, and request headers
- **Behavior**:
  - Settings are saved in the current project's unified Snow JSON settings
  - Telemetry is opt-in and is not enabled by default
  - Snow CLI only collects and exports telemetry data; viewing traces, metrics, and logs requires external systems such as OpenTelemetry Collector, Jaeger, Prometheus, Grafana, or APM/HPM
- **Panel Operations**:
  - `↑/↓` - Switch between fields
  - `←/→` or `Enter` - Cycle the current option value
  - Type directly - Edit the Endpoint or Headers field
  - `S` - Save the current configuration
  - `ESC` - Save and close the panel
- **Example**: Type `/telemetry` to open the telemetry configuration panel

## `/permissions`

Manage tool permissions.

- **Function**: Open permissions management panel
- **Features**: Manage always-approved tools list, control which tools can execute automatically
- **Use Cases**: Need to configure auto-approval permissions for tools, or revoke automatic execution permissions for certain tools
- **Example**: Type `/permissions` to open permissions panel

## `/auto-format`

Toggle auto-formatting after MCP file edits.

- **Function**: Enable, disable, or inspect the current project's auto-format status
- **Parameters**:
  - No parameters: `/auto-format` - Toggle the current state directly
  - `on`: `/auto-format on` - Enable auto-formatting
  - `off`: `/auto-format off` - Disable auto-formatting
  - `status`: `/auto-format status` - Show the current status
- **Behavior**:
  - The setting is persisted in the project's `.snow/settings.json`
  - It only affects the current project
  - The default state is enabled
- **Use Cases**: Control whether files edited by AI through MCP are automatically formatted afterward
- **Examples**:
  - `/auto-format` - Toggle the current state
  - `/auto-format status` - Check the status
  - `/auto-format off` - Turn auto-formatting off

## `/config`

Export or import Snow CLI YAML configuration; the session control plane also supports viewing and hot-updating API limits and model fields.

### TUI slash (backup / restore)

- **Function**: Back up or restore Snow CLI configuration through a YAML file
- **Parameters**:
  - `export`: `/config export` - Choose a save location and export the current configuration
  - `import`: `/config import` - Choose a YAML file and import configuration from it
- **Behavior**:
  - Export opens a save dialog and writes the current configuration to a YAML file
  - Import opens a file picker and restores configuration from the selected YAML file
  - Only the `export` and `import` subcommands are supported; invalid or missing arguments show the usage hint
- **Examples**:
  - `/config export` - Export configuration
  - `/config import` - Import configuration

### Session control plane / headless (view & hot-set context)

The TUI `/config` command is **only** for YAML export/import. You **cannot** set context with a slash like `/config 12000`. To change `maxContextTokens` / `maxTokens` / model names, use the **session-command control plane** (Agent tool `session-command-run`, or CLI `snow cmd`). Full matrix: [29.Session Command Control Plane](./29.Session%20Command%20Control%20Plane.md).

| Command ID        | CLI form                          | Risk      | Description                                                                |
| ----------------- | --------------------------------- | --------- | -------------------------------------------------------------------------- |
| `config.snapshot` | `snow cmd config snapshot`        | read      | Default bare `config`; non-secret config snapshot (includes api summary)   |
| `config.status`   | `snow cmd config status`          | read      | Active profile `maxContextTokens` / `maxTokens` / models                   |
| `config.set`      | `snow cmd config set key=value …` | low_write | **Hot-set** limits/models; **no restart** required in the same process TUI |

**Supported `config.set` keys** (`key=value`, multiple allowed):

- `maxContextTokens` — model max context window
- `maxTokens` — max output tokens per response
- `advancedModel` / `basicModel` — advanced/basic model names
- `requestMethod` — `chat` \| `responses` \| `gemini` \| `anthropic`

Setting `apiKey` via the control plane is **not** supported (keys still go through the setup UI or controlled import; silent key changes are out of scope).

**Behavior**:

- Writes `~/.snow/config.json` **and** the active profile (e.g. `~/.snow/profiles/<name>.json`)
- Same-process TUI (including StatusLine) hot-refreshes; an external `snow cmd` process does **not** hot-refresh an already open TUI
- Agents should prefer `session-command-run` → `config.set` / `config.status`; do **not** treat hand-editing JSON as the official automation path

**Examples**:

```bash
snow cmd config status --json
snow cmd config set maxContextTokens=470000 --json
snow cmd config set maxContextTokens=120000 maxTokens=8192 --json
snow cmd config set advancedModel=grok-4.5 basicModel=grok-4.5 --json
snow cmd config snapshot --json
```

Agent tool equivalents:

```json
{"command": "config.status"}
```

```json
{"command": "config.set", "args": "maxContextTokens=470000"}
```

## `/help`

Help information.

- **Function**: Open help panel
- **Features**: Display shortcuts, common command descriptions
- **Example**: Type `/help` or press `?` key

## `/quit`

Exit program.

- **Function**: Safely exit Snow CLI application
- **Features**:
  - Stop codebase indexing
  - Disconnect VSCode connection
  - Clean up resources
- **Example**: Type `/quit` or press `Ctrl+C`

## `/worktree`

Git branch management.

- **Function**: Open interactive Git branch management panel
- **Features**:
  - Automatically detect if current directory is a Git repository
  - Display all local branches with current branch marked
  - Quick branch switching
  - Create new branches
  - Delete branches (supports force deletion of unmerged branches)
  - Prompt to stash changes before switching when local changes conflict
- **Panel Operations**:
  - `↑/↓` - Move selection up/down
  - `Enter` - Switch to selected branch
  - `N` - Create new branch
  - `D` - Delete selected branch
  - `Y/N` - Confirm/cancel deletion or stash-and-switch
  - `ESC` - Close panel
- **Use Cases**: Need to quickly manage Git branches without leaving the terminal
- **Example**: Type `/worktree` to open branch management panel

## `/add-dir`

Add working directory.

- **Function**: Add a working directory (supports local directories and SSH remote directories)
- **Usage**:
  - No parameters: `/add-dir` - Open directory management panel
  - With local path: `/add-dir /path/to/project` - Directly add a local directory
  - Remote directory: Use the panel and press `S` to enter "Add SSH Remote Directory", then fill host/port/username/auth method/remote path
- **Configuration File**: `.snow/working-dirs.json`
- **Examples**:
  - `/add-dir` - Open panel (`A` add local, `S` add SSH, `D` delete marked)
  - `/add-dir D:\projects\myapp` - Add a local directory directly

## `/cleanup`

Clean up data in the `~/.snow` directory.

- **Function**: Open the cleanup panel to delete unneeded sessions, snapshots, logs and more to free disk space
- **Two cleanup modes**:
  - By project: Lists every project consuming disk space; mark projects and delete their sessions, snapshots, history, TODOs, goals and team snapshots
  - By age: Pick a 7/15/30/90-day threshold and delete data older than it (logs, usage stats, tasks, exports, sessions, snapshots, history, TODOs, etc.)
- **Panel controls**:
  - `↑/↓` - Move selection
  - `Enter` - Enter the selected cleanup mode
  - `Space` - Mark/unmark a project (by project)
  - `A` - Select all / deselect all projects (by project)
  - `D` - Delete marked projects (by project) or delete data older than the selected age (by age)
  - `Y/N` - Confirm/cancel deletion
  - `ESC` - Go back or close the panel
- **Examples**:
  - `/cleanup` - Open the cleanup panel
  - In "by project", mark old projects and press `D` to delete
  - In "by age", choose "older than 30 days" and press `D` to delete

## `/backend`

View background processes.

- **Function**: Open background process management panel
- **Features**:
  - Display all commands running in background
  - View process status (running, completed, failed)
  - View process output and runtime duration
  - Support terminating running processes
- **Panel Operations**:
  - `↑/↓` - Select process
  - `Enter` - Terminate selected running process
  - `ESC` - Close panel
- **Use Cases**: Manage long-running commands moved to background via `Ctrl+B`
- **Example**: Type `/backend` to view background processes

## `/loop`

Create a scheduled loop task.

- **Function**: Create a loop task that executes a specified prompt at a fixed interval or at a specific local time every day. By default, loops are session-scoped and stop when the current Snow CLI session exits; daemon mode can keep a loop running in the background.
- **Syntax**:
  - `/loop <duration> <prompt>` - Create a session-scoped loop with prefix duration syntax, e.g. `/loop 5m check service status`
  - `/loop daemon <duration> <prompt>` - Create a persistent background daemon loop, e.g. `/loop daemon 5m check service status`
  - `/loop --daemon <duration> <prompt>` - Flag-style daemon syntax, equivalent to the `daemon` prefix
  - `/loop <prompt> every <number> <unit>` - Interval suffix format, e.g. `/loop check service status every 2 hours`
  - `/loop daily HH:mm <prompt>` - Run every day at a specific local time, e.g. `/loop daily 09:30 check daily report`
  - `/loop at HH:mm <prompt>` - Run every day at a specific local time, e.g. `/loop at 18:00 summarize today`
  - `/loop every day at HH:mm <prompt>` - Daily-time prefix format, e.g. `/loop every day at 09:30 check daily report`
  - `/loop <prompt> every day at HH:mm` - Daily-time suffix format, e.g. `/loop check daily report every day at 09:30`
  - Omitting a duration or daily time defaults to a 10-minute interval
- **Duration Units**:
  - Seconds: `s`, `sec`, `second`, `seconds`
  - Minutes: `m`, `min`, `minute`, `minutes`
  - Hours: `h`, `hr`, `hour`, `hours`
  - Days: `d`, `day`, `days`
  - Compound formats supported: e.g. `8h30m`, `1d12h`
- **Daily Time Rules**:
  - Time format is `HH:mm`; valid range is `00:00` to `23:59`
  - Local time is used; `9:30` is normalized to `09:30`, but `09:30` is recommended in documentation
  - If the target time has already passed today, or exactly matches the current time, the next run is scheduled for the same time tomorrow
- **Sub-commands**:
  - `/loop list` - List all active loop tasks; the output includes a `Loop ID` for cancellation
  - `/loop cancel <id>` or `/loop stop <id>` - Cancel a specific loop task by Loop ID
  - `/loop tasks` - Open the task manager and show related tasks
- **Session vs daemon mode**:
  - Session-scoped loop: created with `/loop 5m <prompt>` or `/loop daily 09:30 <prompt>`, valid only in the current Snow CLI session, and stops when the session exits
  - Daemon loop: created with `/loop daemon 5m <prompt>` or `/loop --daemon daily 09:30 <prompt>`, starts a detached background process, and keeps running after the current Snow CLI session exits
  - Daemon state is stored in `~/.snow/loop-daemons`; logs are stored in `~/.snow/loop-logs`
  - `snow --loop-daemon-execute <base64-loop-state>` is an internal startup parameter used by daemon child processes and is not recommended for manual use
- **Notes**:
  - Maximum 50 active loops at a time
  - If the previous task is still running when the interval fires, the new trigger is skipped automatically
  - Run `/loop list` first to obtain the `Loop ID` before cancelling a loop
  - Daemon loops must be stopped explicitly with `/loop cancel <id>` or `/loop stop <id>`
- **Examples**:
  - `/loop 5m check logs for errors` - Run every 5 minutes and stop when the session exits
  - `/loop daemon 5m check logs for errors` - Run every 5 minutes and keep running after the current Snow CLI session exits
  - `/loop --daemon 8h30m generate daily report` - Run a persistent background loop every 8 hours 30 minutes
  - `/loop check service status every 2 hours` - Run every 2 hours
  - `/loop daily 09:30 check daily report` - Run every day at 09:30 local time
  - `/loop at 18:00 summarize today` - Run every day at 18:00 local time
  - `/loop every day at 09:30 check daily report` - Run every day at 09:30 local time
  - `/loop check daily report every day at 09:30` - Run every day at 09:30 local time
  - `/loop list` - View all loop tasks and Loop IDs
  - `/loop cancel abc12345` - Cancel a specific loop task

## `/profiles`

Open the profile and model switching panel.

- **Function**: Open the Profile panel to switch configuration profiles and AI model settings
- **Features**:
  - Switch between different configuration profiles
  - Switch the currently used AI model
  - Support search filtering
  - Switch the model used for conversation in real time
  - Support switching thinking intensity settings (for models that support thinking)
- **Panel Operations**:
  - `↑/↓` - Move selection up/down
  - `Tab` - Open the detail editor for the focused Profile (does not switch active)
  - `Enter` - Switch to the selected Profile (set as active)
  - `Backspace/Delete` - Delete the last character of the search keyword
  - Type characters directly - Filter the Profile list
  - `ESC` - Close the panel
- **Use Cases**: When shortcut keys conflict or are inconvenient, open the panel via command; also useful for quickly switching AI models
- **Example**: Type `/profiles` to open the profile and model selection panel
- **Headless / Agent entry**:
  - List / current / switch: `snow cmd profiles list|current|switch <name> --yes`
  - Change context / output limit / model names: use `config.set` / `config.status` (see the `/config` session control plane section above), **not** `/profiles` slash args
  - Full matrix: [29.Session Command Control Plane](./29.Session%20Command%20Control%20Plane.md)
